package com.pk.platform.domain.privilege;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import com.pk.platform.util.constant.Constant;

public class Department implements Serializable {

	private Long id;
	
	private String deptName;
	
	private Set<User> userSet = new HashSet<User>();
	
	public Set<User> getEffectiveUser()
	{
		Set<User> uset = new HashSet<User>();
		for(User user : userSet)
		{
			if(Constant.USE.equals(user.getUseType()))
			{
				uset.add(user);
			}
		}
		return uset;
	}

	public Department()
	{
		
	}

	public Department(Long id)
	{
		this.id = id;
	}
	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	public Set<User> getUserSet() {
		return userSet;
	}

	public void setUserSet(Set<User> userSet) {
		this.userSet = userSet;
	}
	
}
